import http from '../../utils/http'

//获取订单详情
export const reqOrderInfo = () => {
    return http.get('/order/trade')
}
//获取订单详情页的收货地址
export const reqOrderAddress = () => {
    return http.get('/userAddress/getOrderAddress')
}

//获取立即购买商品详情信息
export const reqNowBuy = ({ goodsId, ...data }) => {
    return http.get(`/order/buy/${goodsId}`, data)
}
//提交订单
export const reqSubmitOrder = () => {
    return http.get('/order/submitOrder')
}
//微信预支付信息
export const reqPrePayInfo = (orderNo) => {
    return http.get(`/webChat/createJsapi/${orderNo}`)
}
//微信支付结果
export const reqPayStatus = (orderNo) => {
    return http.get(`/webChat/queryPayStatus/${orderNo}`)
}